<?php
namespace app\common\model;
use app\common\traits\Models;
use think\Model;
use think\facade\{
    App,Request,Config
};
class UserAddress extends Model
{
    use Models;
    protected $readonly = [];
    protected $auto     = [];
    protected $insert   = [];
    protected $update   = [];
//获取器====================================================================================//
    public function getCreateTimeAttr($value)
    {
        return com_time_format($value);
    }
    public function getUpdateTimeAttr($value)
    {
        return com_time_format($value);
    }

    public function getIsDefaultAttr($value)
    {
        return c("type.is_default",$value);
    }
/*关联模型=================================================================================*/
   	public function user()
    {
        return $this->belongsTo('user','user_id','id');
    }

}
